<template>
  <BasicModal
    v-bind="$attrs"
    title="用户详情"
    @register="registerModal"
    :showOkBtn="false"
    :width="1200"
  >
    <Description @register="registerdes" class="mt-4" />
  </BasicModal>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { Description, useDescription } from '/@/components/Description/index';

  const dataDes = ref({});

  // const [register, { closeModal, setModalProps }] = useModalInner(callback);
  const [registerModal] = useModalInner((row: any) => {
    dataDes.value = row;
  });

  const [registerdes] = useDescription({
    title: '基本信息',
    data: dataDes,
    schema: [
      { field: 'username', label: '登录名' },
      { field: 'customer', label: '客户名' },
      { field: 'accountManager', label: '客户负责人' },
      { field: 'contact', label: '联系方式' },
      { field: 'detailedAddress', label: '地区' },
      { field: 'clientType', label: '角色' },
      { field: 'createTime', label: '创建时间' },
    ],
    column: 3,
  });
</script>
